* Clean up
clear all

/* Set working directory: please set your own
cd "~/Dropbox/JOP third submission/JOP replication/"
*/

* Open dataset

use 01_data/cis_data.dta, clear

* A fake model to start the dataset
regr cabine_use CCAA
regsave CCAA using 01_data/survey_ccaa_jk.dta, ci level(95) replace addlabel ///
(Removed, fake, Model, fake, Controls, fake)

* Actual analyses
forvalues x = 1/19{
	regr cabine_use pp_dummy female i.income age age_sq i.education i.TAMUNI i.CCAA if CCAA != `x', r
	regsave pp_dummy using 01_data/survey_ccaa_jk.dta, ci level(95) append addlabel ///
(Removed, `x', Model, cabine_use, Controls, With controls)

	regr cabine_use pp_dummy if CCAA != `x', r
	regsave pp_dummy using 01_data/survey_ccaa_jk.dta, ci level(95) append addlabel ///
(Removed, `x', Model, cabine_use, Controls, Without controls)
}
